<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>修改 | 外卖配送信息系统</title>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <link rel="stylesheet" type="text/css" href="css/more.css"/>
    <script src="/js/vue.global-3.2.45.js"></script>
    <script src="/js/axios-1.2.1.js"></script>
</head>
<body>
<div class="Change" id="change-app">

    <div>
        <br/>
        <a href="/page">
            <img src="/img/back.png" alt="back">
        </a>
        </br>
        <a href="javascript:(0)" v-if="basicInfo.type !== 'root'" @click="changeType = 'info'">修改信息&nbsp;&nbsp;&nbsp;</a>
        <a href="javascript:(0)" @click="changeType = 'pwd'">修改密码</a>
    </div>
    <br/>

    <div class="changeInfo" id="changeInfo" v-show="changeType === 'info' && basicInfo.type !== 'root'">
        <form>
            <img src="/img/person.png" alt="back"><br/>
            <label>姓名：<br/><br/>
                <input type="text" id="name" v-model="changeInfo.name"/>
            </label>
            <br/>
            <br/>
            <label>
                <input type="button" @click="changeName" value="修改"/>
            </label>
        </form>
    </div>

    <div class="changePassword" id="changePassword" style="display: none" v-show="changeType === 'pwd'">
        <form>
            <label>旧密码：<br/>
                <input type="password" id="oldPwd" v-model="oldPwd"/>
            </label>
            <br/>
            <label>新密码：<br/>
                <input type="password" id="newPwd" v-model="changeInfo.newPwd"/>
            </label>
            <br/>
            <label>再输入一次新密码：<br/>
                <input type="password" id="againPwd" v-model="againPwd"/>
            </label>
            <br/>
            <br/>
            <label>
                <input type="button" @click="changePwd" value="修改"/>
            </label>
        </form>
    </div>

    <br/>
    <p id="changeHint" style="text-align:center; color: red">{{ changeHint }}</p>
</div>
</body>
<script src="/js/change.js"></script>
</html>